Skip to content

[multibyte] Support offset and align for array load and store#8923

Merged
brendandahl merged 2 commits into
WebAssembly:mainfrom
brendandahl:multibyte-array-immediates
Jul 22, 2026
Merged

[multibyte] Support offset and align for array load and store#8923
brendandahl merged 2 commits into
WebAssembly:mainfrom
brendandahl:multibyte-array-immediates

Conversation

@brendandahl

Copy link
Copy Markdown
Collaborator

Add offset and alignment immediates to ArrayLoad and ArrayStore AST nodes, text format, and binary encoding.

Multibyte array access operations in the WebAssembly GC spec reuse memarg immediates to specify a static byte offset and alignment hint. This adds support for parsing, printing, and binary reading/writing of these attributes for array load and store instructions.

Add offset and alignment immediates to ArrayLoad and ArrayStore AST
nodes, text format, and binary encoding.

Multibyte array access operations in the WebAssembly GC spec reuse
memarg immediates to specify a static byte offset and alignment hint.
This adds support for parsing, printing, and binary reading/writing of
these attributes for array load and store instructions.
@brendandahl
brendandahl requested a review from a team as a code owner July 21, 2026 20:42
@brendandahl
brendandahl requested review from stevenfontanella and removed request for a team July 21, 2026 20:42

@stevenfontanella stevenfontanella left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need any validator code for this? I see that there is already logic for memory offsets and alignments: link.

Comment thread src/wasm/wasm-stack.cpp Outdated
Comment thread test/lit/array-multibyte.wast
@brendandahl

Copy link
Copy Markdown
Collaborator Author

Do we need any validator code for this? I see that there is already logic for memory offsets and alignments: link.

Yes, I'll have that in a separate branch. This one was getting kind of big, so I've split it into 1) offset/align, 2) expanded types and validation 3) interpreter support.

@brendandahl
brendandahl merged commit acf302c into WebAssembly:main Jul 22, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants